package com.originskyseed.platform.user.service;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import com.originskyseed.platform.core.base.BasePage;
import com.originskyseed.platform.user.model.PlayerRelateConsume;

/**
 * 玩家消费信息表Service接口类（OSI_PLAYER_RELATE_CONSUME）
 *
 * @author wlj
 */
public interface IPlayerRelateConsumeService {

	/**
	 * 删除记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKey(String id) throws Exception;

	/**
	 * 批量删除记录
	 *
	 * @param ids
	 * @return
	 * @throws Exception
	 */
	public int deleteByPrimaryKeys(List<String> ids) throws Exception;

	/**
	 * 插入记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insert(PlayerRelateConsume record) throws Exception;

	/**
	 * 插入记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int insertSelective(PlayerRelateConsume record) throws Exception;

	/**
	 * 更新记录
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKey(PlayerRelateConsume record) throws Exception;

	/**
	 * 更新记录（仅非空值字段）
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public int updateByPrimaryKeySelective(PlayerRelateConsume record) throws Exception;

	/**
	 * 查询玩家对主播的消费记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public BigDecimal countAmountByIdAndAnchorId(String id, String anchorId) throws Exception;

	/**
	 * 查询记录
	 *
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public PlayerRelateConsume selectByPrimaryKey(String id) throws Exception;

	/**
	 * 查询列表
	 *
	 * @param record
	 * @return
	 * @throws Exception
	 */
	public List<PlayerRelateConsume> selectList(PlayerRelateConsume record) throws Exception;

	/**
	 * 分页查询列表
	 *
	 * @param params
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public BasePage<PlayerRelateConsume> selectListByPage(Map<String, Object> params, BasePage<PlayerRelateConsume> page) throws Exception;

	/**
	 * 批量插入记录
	 *
	 * @param list
	 * @return
	 * @throws Exception
	 */
	public int insertBatch(List<PlayerRelateConsume> list) throws Exception;


	/**
	 * 批量插入记录
	 *
	 * @param list
	 * @return
	 * @throws Exception
	 */
	public int insertBatch(String tenantCode,List<PlayerRelateConsume> list) throws Exception;

	/**
	 * 批量插入记录,月表
	 *
	 * @param list
	 * @return
	 * @throws Exception
	 */
	public int insertMonthBatch(List<PlayerRelateConsume> list) throws Exception;



	/**
	 * 批量插入记录,月表
	 *
	 * @param list
	 * @return
	 * @throws Exception
	 */
	public int insertMonthBatch(String tenantCode,List<PlayerRelateConsume> list) throws Exception;

	/**
	 * 分页查询消费明细列表
	 *
	 * @param params
	 * @param page
	 * @return
	 * @throws Exception
	 */
	public BasePage<PlayerRelateConsume> selectConsumptionDetailsByPage(Map<String, Object> params, BasePage<PlayerRelateConsume> page) throws Exception;

	/**
	 * 查询消费明细列表
	 *
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public List<PlayerRelateConsume> selectConsumptionDetailsByMap(Map<String, Object> params) throws Exception;

	/**
	 * 查询orderId是否存在
	 * 
	 * @param list
	 * @return
	 * @throws Exception
	 */
	public List<String> selectOrderIds(String tenantCode,List<String> list) throws Exception;


	/**
	 * 查询orderId是否存在
	 *
	 * @param list
	 * @return
	 * @throws Exception
	 */
	public List<String> selectOrderIds(List<String> list) throws Exception;

	/**
	 * 查询消费总额
	 *
	 * @param params
	 * @return
	 * @throws Exception
	 */
	public BigDecimal selectTotalAmountByMap(Map<String, Object> params) throws Exception;
}
